
#ifndef _APP_H_
#define _APP_H_


#include "dac6587.h"

#include "tcpip.h"

#define ldp_MAGIC 'K'
#define IOCTL_LDP_INTERLOCK_READ_1		_IOW	(ldp_MAGIC, 1, int)
#define IOCTL_LDP_INTERLOCK_READ_2		_IOW	(ldp_MAGIC, 2, int)

#define IOCTL_LDP_ENABLE_WRITE_1		_IOW	(ldp_MAGIC, 3, int)
#define IOCTL_LDP_ENABLE_WRITE_2		_IOW	(ldp_MAGIC, 4, int)

#define IOCTL_LDP_LM_FAULT_READ_1		_IOW	(ldp_MAGIC, 5, int)
#define IOCTL_LDP_LM_FAULT_READ_2		_IOW	(ldp_MAGIC, 6, int)

#define IOCTL_LDP_TEMP_FAULT_READ_1		_IOW	(ldp_MAGIC, 7, int)
#define IOCTL_LDP_TEMP_FAULT_READ_2		_IOW	(ldp_MAGIC, 8, int)

#define IOCTL_LED_WRITE					_IOW	(ldp_MAGIC, 9, int)



#define COUNTER_MAGIC 'C'
#define IOCTL_COUNTER_READ		_IOW	(COUNTER_MAGIC, 1, int)

#define POWER_MAGIC 'P'
#define IOCTL_CMP_ON	_IOW	(POWER_MAGIC, 1, int)
#define IOCTL_CMP_OFF	_IOW	(POWER_MAGIC, 2, int)
#define IOCTL_PZT_ON	_IOW	(POWER_MAGIC, 3, int)
#define IOCTL_PZT_OFF	_IOW	(POWER_MAGIC, 4, int)



struct ConterSet					//set counter 
{
	int		u16EnableCh1;		// set enable		
	int		u16FreqCh1;			// set frequence - Hz
	int		u16HihtVoltTimeCh1;	// set hiht voltage time us
	int		u16MaxFreqCh1;		// set Maxim frequence			
	int		u16MinFreqCh1;		// set minim frequence	
	int		u16ChannelCh1;		// set Channel 1
	
	int		u16EnableCh2;		// set enable
	int		u16FreqCh2;			// set frequence - Hz
	int		u16HihtVoltTimeCh2;	// set hiht voltage time us
	int		u16MaxFreqCh2;		// set Maxim frequence			
	int		u16MinFreqCh2;		// set minim frequence	
	int		u16ChannelCh2;		// set Channel 1

	int		u16Version;			//Version
	
};
struct DacSet
{
	unsigned short		u16VolatageChn1;
	unsigned short		u16VolatageChn2;
	unsigned short		u16VolatageChn3;
	unsigned short		u16VolatageChn4;	
};

struct Config
{
	struct ConterSet stCounterSet;
	struct DacSet	stDacSet;
	
};
struct SysError
{
	char HeartError;
	char CommError;
	char LcdError;
};


#endif




